//写一个判断水仙花数的函数

#include <stdio.h>

int sxh(int n)
{
	int n1,n2,n3,lemp=0;
	if (100<=n&&n<1000)
	{
		n3=n/100;
		n2=(n/10)%10;
		n1=n%10;
		if (n==n1*n1*n1+n2*n2*n2+n3*n3*n3)
			lemp=1;
	}

	return (lemp);
}

int main()
{
	int i;
	for (i=100;i<1000;i++)
		if (sxh(i))
			printf("%d ",i);
	printf("\n");

	return 0 ;
}
